import axiosServer from "@/utils/request";


/**
 * Update total number of people for reservation
 * @param count Count
 * @returns {*}
 * @constructor
 */
export const UpdatePeopleNum = (count) => {
    return axiosServer({
        method: "POST",
        url: "/reservation/updateCount",
        params: { count },
    });
};
/**
 * Get actual number of people for reservation
 */
export const GetPeopleNum = () => {
    return axiosServer({
        method: "get",
        url: "/reservation/sum",
    });
};

/**
 * Get total number of people for reservation
 */
export const GetAllPeopleNum = () => {
    return axiosServer({
        method: "get",
        url: "/reservation/count",
    });
};

/**
 * Query reservation time
 */
export const GetTime = () => {
    return axiosServer({
        method: "get",
        url: "/reservationRule/loadByVersion",
    });
};

/**
 * Update reservation time
 */
export const UpdateTime = (startTime, endTime) => {
    return axiosServer({
        method: "post",
        url: "/reservationRule/update",
        data: { startTime, endTime }
    });
};